package com.ruoyi.service.impl;

import java.util.List;

import com.ruoyi.domain.TeacherEvaluation;
import com.ruoyi.mapper.TeacherEvaluationMapper;
import com.ruoyi.service.ITeacherEvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-22
 */
@Service
public class TeacherEvaluationServiceImpl implements ITeacherEvaluationService
{
    @Autowired
    private TeacherEvaluationMapper teacherEvaluationMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param studentId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public TeacherEvaluation selectTeacherEvaluationByStudentId(Long studentId)
    {
        return teacherEvaluationMapper.selectTeacherEvaluationByStudentId(studentId);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param teacherEvaluation 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<TeacherEvaluation> selectTeacherEvaluationList(TeacherEvaluation teacherEvaluation)
    {
        return teacherEvaluationMapper.selectTeacherEvaluationList(teacherEvaluation);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param teacherEvaluation 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertTeacherEvaluation(TeacherEvaluation teacherEvaluation)
    {
        return teacherEvaluationMapper.insertTeacherEvaluation(teacherEvaluation);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param teacherEvaluation 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateTeacherEvaluation(TeacherEvaluation teacherEvaluation)
    {
        return teacherEvaluationMapper.updateTeacherEvaluation(teacherEvaluation);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param studentIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteTeacherEvaluationByStudentIds(Long[] studentIds)
    {
        return teacherEvaluationMapper.deleteTeacherEvaluationByStudentIds(studentIds);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param studentId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteTeacherEvaluationByStudentId(Long studentId)
    {
        return teacherEvaluationMapper.deleteTeacherEvaluationByStudentId(studentId);
    }

    @Override
    public TeacherEvaluation getTeacherRate(Long teachId, Long studentId) {
        return teacherEvaluationMapper.getTeacherRate(teachId,studentId);

    }
}
